import {createPinia, setActivePinia} from 'pinia';
import {PersistedStateFactoryOptions, createPersistedState} from 'pinia-plugin-persistedstate';

export const store = createPinia();

// 本地持久化
store.use(createPersistedState(<PersistedStateFactoryOptions>{
    key: (storeKey) => `__persisted_${storeKey}`,
    auto: false,
  })
);

export * from './modules/user.ts';
export * from './modules/app.ts';
export * from './modules/theme.ts';

export default store;

